package main

import (
	"fmt"
)

/*
396. 旋转函数
https://leetcode-cn.com/problems/rotate-function/

找到绝对值最大的数字
*/
func maxRotateFunction(nums []int) int {
	var max = nums[0]

	for _, num := range nums {
		if num < 0 {
			num = -num
		}
		if num > max {
			max = num
		}
	}
	println(max)

	return -1
}

func L396() {
	fmt.Println(maxRotateFunction([]int{4, 3, 2, 6}))
}
